import torch
import torchvision
from torch.utils.tensorboard import SummaryWriter

model = torchvision.models.resnet50()
x = torch.randn(64, 3, 256, 256)
with SummaryWriter(log_dir='') as sw:
    sw.add_graph(model, x)
    sw.close()
